package com.lly.songhigh.view;

import android.app.Activity;
import android.graphics.drawable.ColorDrawable;
import android.view.View;
import android.widget.AdapterView;
import android.widget.PopupWindow;

import com.lly.songhigh.R;

/**
 * Created by 李新伟 on 15/11/4.
 */
public class MusicInfoPopupWindow extends PopupWindow {
    private View mMenuView;
    private SlideDeleteListView slideDeleteListView;

    public MusicInfoPopupWindow(Activity context, AdapterView.OnItemClickListener onItemClickListener, View view) {
        super(context);
        mMenuView = view;
        slideDeleteListView = (SlideDeleteListView) mMenuView.findViewById(R.id.music_list);
        slideDeleteListView.setOnItemClickListener(onItemClickListener);

        //设置SelectPicPopupWindow的View
        this.setContentView(mMenuView);
        //设置SelectPicPopupWindow弹出窗体的宽
        this.setWidth(500);
        //设置SelectPicPopupWindow弹出窗体的高
        this.setHeight(700);
        //设置SelectPicPopupWindow弹出窗体可点击
        this.setFocusable(true);
        //设置SelectPicPopupWindow弹出窗体动画效果
//        this.setAnimationStyle(R.style.PWMenuAnim);
        //实例化一个ColorDrawable颜色为半透明-
        ColorDrawable dw = new ColorDrawable(0x00000000);
        //设置SelectPicPopupWindow弹出窗体的背景
        this.setBackgroundDrawable(dw);
    }
}